package uk.co.iceroad.twu.m1;

import org.junit.Test;

import java.util.List;

import static org.junit.Assert.*;

public class PrimeFactorsTest {

    @Test
    public void testNoFactors(){
        PrimeFactors primeFactors = new PrimeFactors();
        List<Integer> factors = primeFactors.getPrimeFactors(1);
        assertTrue(factors.size() == 0);
    }

    @Test
    public void testFactors(){
        PrimeFactors primeFactors = new PrimeFactors();
        List<Integer> factors = primeFactors.getPrimeFactors(30);
        assertTrue(factors.size() == 3);
        assertTrue(factors.get(0) == 2);
        assertTrue(factors.get(1) == 3);
        assertTrue(factors.get(2) == 5);
    }
}
